
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>{{ config('app.name', 'Laravel') }}</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="{{ asset("/bower_components/AdminLTE/bootstrap/css/bootstrap.min.css") }}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
    <!-- Ionicons -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css">
    <!-- Theme style -->
    <link rel="stylesheet" href="{{ asset("/bower_components/AdminLTE/dist/css/AdminLTE.min.css") }}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link rel="stylesheet" href="{{ asset("/bower_components/AdminLTE/dist/css/skins/_all-skins.min.css") }}">

@yield('css')
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<!--
BODY TAG OPTIONS:
=================
Apply one or more of the following classes to get the
desired effect
|---------------------------------------------------------|
| SKINS         | skin-blue                               |
|               | skin-black                              |
|               | skin-purple                             |
|               | skin-yellow                             |
|               | skin-red                                |
|               | skin-green                              |
|---------------------------------------------------------|
|LAYOUT OPTIONS | fixed                                   |
|               | layout-boxed                            |
|               | layout-top-nav                          |
|               | sidebar-collapse                        |
|               | sidebar-mini                            |
|---------------------------------------------------------|
-->
<body class="hold-transition {{ config('app.skin', 'skin-blue') }} sidebar-mini">
<div class="wrapper">

    <!-- Main Header -->
    <header class="main-header">
        <!-- Logo -->
        <a href="{{ url('/home') }}" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>{{ config('app.name', 'Laravel') }}</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>{{ config('app.name', 'Laravel') }}</b></span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <div class="collapse navbar-collapse pull-left" id="navbar-collapse">
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">运营核心<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url('/slot') }}">广告管理</a></li>
                            <li><a href="{{ url('/label') }}">推广标签</a></li>
                            <li><a href="{{ url('/recommend') }}">热门推荐</a></li>
                            <li><a href="{{ url('/topic') }}">分类专题</a></li>
                            <li><a href="{{ url('/ann') }}">公告通知中心</a></li>

                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">平台产品<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url('/platform') }}">借款平台管理</a></li>
                            <li><a href="{{ url('/product') }}">借款产品管理</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">福利模块<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url('/welfare') }}">福利管理</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">前台用户管理<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url('/admin') }}">用户管理</a></li>
                            <li><a href="{{ url('/feedback') }}">意见反馈</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">后台管理<span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu">
                            <li><a href="{{ url('/console/users')}}">后台用户管理</a></li>
                            <li><a href="{{ url('/console/roles')}}">角色管理</a></li>
                            <li><a href="{{ url('/version') }}">版本管理</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->
                    <!-- Notifications: style can be found in dropdown.less -->
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="{{url('/uploads/cp/user2-160x160.jpg' )}}" class="user-image" alt="User Image">
                            <span class="hidden-xs"> {{ Auth::user()->name }}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src="{{url('/uploads/cp/user2-160x160.jpg' )}}" class="img-circle" alt="User Image">

                                <p>
                                    {{ Auth::user()->name }}
                                    <small>本次登录时间：{{Auth::user()->updated_at}}</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <!-- Menu Footer-->
                            <li class="user-footer">

                                <div class="col-xs-6 text-center">
                                    <a href="{{ url('/user/getReset') }}" class="btn btn-default btn-flat">修改密码</a>
                                </div>
                                <div class="col-xs-6 text-center">
                                    <a href="{{url('/auth/logout')}}" class="btn btn-default btn-flat">注销</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>

    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar Menu -->
            <div class="user-panel">
                <div class="pull-left image">
                    <img width="70" height="70" src="{{url('/uploads/cp/user2-160x160.jpg' )}}" class="img-circle" alt="User Image" >
                </div>
                <div class="pull-left info">
                    <p>{{ Auth::user()->name }}</p>
                    <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                </div>
            </div>
            <ul class="sidebar-menu">
                <li class="header">导航</li>
                @if($atc ==1)
                    <li class=" treeview  {{($active == 1)? 'active' : ''}}">
                        <a href="#">
                            <i class="fa fa-dashboard"></i> <span>广告管理</span>
                            <span class="pull-right-container">
                            <i class="fa fa-angle-left pull-right"></i>
                        </span>
                        </a>
                        <ul class="treeview-menu">
                            <li ><a href="{{ url('/slot') }}"><i class="fa fa-circle-o"></i>位置列表</a></li>
                            <li><a href="{{ url('/advertising') }}"><i class="fa fa-circle-o"></i>内容列表</a></li>
                        </ul>
                    </li>

                    <li class=" treeview {{($active == 2)? 'active' : ''}}">
                        <a href="{{ url('/label') }}">
                            <i class="fa fa-dashboard"></i> <span>推广标签</span>
                            <span class="pull-right-container">
                            <i class="fa fa-angle-left pull-right"></i>
                        </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li class="active"><a href="{{ url('/label') }}"><i class="fa fa-circle-o"></i> 标签列表</a></li>--}}
                        {{--</ul>--}}
                    </li>

                    <li class=" treeview {{($active == 3)? 'active' : ''}}" >
                        <a href="{{ url('/recommend') }}">
                            <i class="fa fa-dashboard"></i> <span>热门推荐</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li ><a href="{{ url('/recommend') }}"><i class="fa fa-circle-o"></i> 热门推荐</a></li>--}}
                        {{--</ul>--}}
                    </li>

                    <li class=" treeview {{($active == 4)? 'active' : ''}}">
                        <a href="{{ url('/topic') }}">
                            <i class="fa fa-dashboard"></i> <span>分类专题</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li ><a href="{{ url('/topic') }}"><i class="fa fa-circle-o"></i>专题列表</a></li>--}}
                        {{--</ul>--}}
                    </li>

                    <li class=" treeview {{($active == 5)? 'active' : ''}}">
                        <a href="{{ url('/ann') }}">
                            <i class="fa fa-dashboard"></i> <span>公告通知</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li ><a href="{{ url('/ann') }}"><i class="fa fa-circle-o"></i> 公告通知中心</a></li>--}}
                        {{--</ul>--}}
                    </li>
                @elseif($atc ==2)
                    <li class=" treeview {{($active == 6)? 'active' : ''}}">
                        <a href="#">
                            <i class="fa fa-dashboard"></i> <span>平台产品</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        <ul class="treeview-menu">
                            <li ><a href="{{ url('/platform') }}"><i class="fa fa-circle-o"></i> 借款平台管理</a></li>
                            <li><a href="{{ url('/product') }}"><i class="fa fa-circle-o"></i> 借款产品管理</a></li>
                        </ul>
                    </li>
                @elseif($atc ==3)
                    <li class=" treeview {{($active == 10)? 'active' : ''}}">
                        <a href="{{ url('/welfare') }}">
                            <i class="fa fa-dashboard"></i> <span>福利列表</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li ><a href="{{ url('/welfare') }}"><i class="fa fa-circle-o"></i> 福利列表</a></li>--}}
                        {{--</ul>--}}
                    </li>
                @elseif($atc ==4)
                    <li class=" treeview {{($active == 7)? 'active' : ''}}">
                        <a href="#">
                            <i class="fa fa-dashboard"></i> <span>用户管理</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        <ul class="treeview-menu">
                            <li ><a href="{{ url('/admin') }}"><i class="fa fa-circle-o"></i> 用户管理</a></li>
                            <li ><a href="{{ url('/feedback') }}"><i class="fa fa-circle-o"></i>意见反馈</a></li>
                        </ul>
                    </li>
                @elseif($atc ==5)
                    <li class=" treeview {{($active == 8)? 'active' : ''}}">
                        <a href="#">
                            <i class="fa fa-dashboard"></i> <span>权限管理</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        <ul class="treeview-menu">
                            <li ><a href="{{ url('/console/users') }}"><i class="fa fa-circle-o"></i> 用户管理</a></li>
                            <li><a href="{{ url('/console/roles') }}"><i class="fa fa-circle-o"></i> 角色管理</a></li>
                        </ul>
                    </li>
                    <li class=" treeview {{($active == 9)? 'active' : ''}}">
                        <a href="{{ url('/version') }}">
                            <i class="fa fa-dashboard"></i> <span>版本管理</span>
                            <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                        </a>
                        {{--<ul class="treeview-menu">--}}
                        {{--<li ><a href="{{ url('/version') }}"><i class="fa fa-circle-o"></i> app版本管理</a></li>--}}
                        {{--</ul>--}}
                    </li>
                @endif
            </ul>
            <!-- /.sidebar-menu -->
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Main content -->
        <section class="content">
        @role('admin|operator|user')
        <!-- Your Page Content Here -->
            @yield('content')
            @endrole
        </section>
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <!-- Main Footer -->
    <footer class="main-footer">
        <!-- To the right -->
        <div class="pull-right hidden-xs">
            {{ config('app.ver', '1.0.0.0') }}
        </div>
        <!-- Default to the left -->
        <strong>Copyright &copy; {{ date('Y') }} <a href="#">{{ config('app.company', '1.0.0.0') }}</a>.</strong> All rights reserved.
    </footer>

</div>
<!-- ./wrapper -->

<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 2.2.3 -->
<script src="{{ asset("/bower_components/AdminLTE/plugins/jQuery/jquery-2.2.3.min.js") }}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{{ asset("/bower_components/AdminLTE/bootstrap/js/bootstrap.min.js") }}"></script>
<!-- AdminLTE App -->
<script src="{{ asset("/bower_components/AdminLTE/dist/js/app.min.js") }}"></script>
@yield('js')
<!-- Optionally, you can add Slimscroll and FastClick plugins.
     Both of these plugins are recommended to enhance the
     user experience. Slimscroll is required when using the
     fixed layout. -->
</body>
</html>
@endif
